import request from '@/api/request'

const BASIC_URL = import.meta.env.VITE_BASIC_URL

// 获取地图标注信息
const reqDeviceAll = () => request.get(BASIC_URL + '/iot/device/all')

// 获取设备统计信息
const reqDeviceStatistic = () =>
  request.get(BASIC_URL + '/iot/device/statistic')

// 获取信息栏的数据
const reqNoticeList = (pageNum = 1, pageSize = 4) =>
  request.get(BASIC_URL + '/system/notice/list', {
    params: {
      pageNum,
      pageSize,
    },
  })

// 获取Mqtt统计数据
const reqBashBoard = () => request.get(BASIC_URL + '/bashBoard/stats')

// 获取饼状图的统计数据
const reqMonitor = () => request.get(BASIC_URL + '/monitor/server')

export default {
  reqDeviceAll,
  reqDeviceStatistic,
  reqNoticeList,
  reqBashBoard,
  reqMonitor,
}
